/*
 * AddDetailPanel.java
 *
 * Created on 2008年6月8日, 下午8:42
 */

package gui;

import abstractmodel.IAccount;

/**
 *
 * @author  littlechild
 */
public class AddDetailPanel extends javax.swing.JPanel {
    
    /** Creates new form AddDetailPanel */
    public AddDetailPanel(IAccount account) {
        super();
        if(account.getAccountInfo().getType()==configure.Global.BANK_ACCOUNT_INFO_TYPE
                || account.getAccountInfo().getType() == configure.Global.MONEY_ACCOUNT_INFO_TYPE) {
            this.add(new AddMoneyBankDetailPanel(account));
        }else {
            this.add(new AddCreditDetailPanel(account));
        }
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        setPreferredSize(new java.awt.Dimension(400, 300));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );
    }// </editor-fold>//GEN-END:initComponents
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables
    
}
